Skip to content

fix(vmm): persist guest events outside the global state lock - #1271

Merged
kvinwang merged 1 commit into
nextfrom
fix/vmm-event-io
Sep 24, 2026
Merged

kvinwang merged 1 commit into
nextfrom
fix/vmm-event-io

Conversation

@kvinwang

@kvinwang kvinwang commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

vm_event_report (HostApi.Notify) wrote instance.info (safe_write, with fsync) and the started flag while holding the global VMM state mutex, so a slow disk stalled every other API call and VM.

Fix

Update the in-memory event state under the lock, then release it before the file write.

Verification

cargo test -p dstack-vmm (209 passed), fmt and clippy clean.

Fixes #1269.

@kvinwang kvinwang changed the title fix(vmm): persist guest events off the executor and outside the global lock fix(vmm): persist guest events outside the global state lock Sep 24, 2026
@kvinwang
kvinwang merged commit 684202f into next Sep 24, 2026
11 checks passed
@kvinwang
kvinwang deleted the fix/vmm-event-io branch September 24, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vmm: guest event persistence holds the global state lock and blocks the async executor

1 participant